package com.ruoyi.db.pms.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品列表对象 pms_goods
 *
 * @author ruoyi
 * @date 2020-04-20
 */

@ApiModel("商品列表实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class PmsGoods extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品编号")
    @Excel(name = "商品编号")
    private Long id;

    @ApiModelProperty("商品条码编号")
    @Excel(name = "商品条码编号")
    @NotBlank(message = "商品条码编号不能为空")
    @Size(min = 0, max = 63, message = "商品条码编号长度不能超过63个字符")
    private String goodsSn;

    @ApiModelProperty("商品名称")
    @Excel(name = "商品名称")
    @NotBlank(message = "商品名称不能为空")
    @Size(min = 0, max = 127, message = "商品名称长度不能超过127个字符")
    private String name;

    @ApiModelProperty("商品所属类目ID")
    @Excel(name = "商品所属类目ID")
    private Long categoryId;

    @ApiModelProperty("商品所属品牌ID")
    @Excel(name = "商品所属品牌ID")
    private Long brandId;

    @ApiModelProperty("商品宣传图片列表")
    @Excel(name = "商品宣传图片列表")
    @Size(min = 0, max = 1023, message = "商品宣传图片列表长度不能超过1023个字符")
    private String gallery;

    @ApiModelProperty("商品关键字(逗号间隔)")
    @Excel(name = "商品关键字(逗号间隔)")
    @Size(min = 0, max = 255, message = "商品关键字(逗号间隔)长度不能超过255个字符")
    private String keywords;

    @ApiModelProperty("商品简介")
    @Excel(name = "商品简介")
    @Size(min = 0, max = 255, message = "商品简介长度不能超过255个字符")
    private String brief;

    @ApiModelProperty("是否上架")
    @Excel(name = "是否上架")
    private Boolean isOnSale;

    @ApiModelProperty("顺序")
    @Excel(name = "顺序")
    private Integer sortOrder;

    @ApiModelProperty("商品页面商品图片")
    @Excel(name = "商品页面商品图片")
    @Size(min = 0, max = 255, message = "商品页面商品图片长度不能超过255个字符")
    private String picUrl;

    @ApiModelProperty("商品分享朋友圈图片")
    @Excel(name = "商品分享朋友圈图片")
    @Size(min = 0, max = 255, message = "商品分享朋友圈图片长度不能超过255个字符")
    private String shareUrl;

    @ApiModelProperty("是否新品首发")
    @Excel(name = "是否新品首发")
    private Boolean isNew;

    @ApiModelProperty("是否人气推荐")
    @Excel(name = "是否人气推荐")
    private Boolean isHot;

    @ApiModelProperty("商品单位")
    @Excel(name = "商品单位")
    @Size(min = 0, max = 31, message = "商品单位长度不能超过31个字符")
    private String unit;

    @ApiModelProperty("专柜价格")
    @Excel(name = "专柜价格")
    private BigDecimal counterPrice;

    @ApiModelProperty("零售价格")
    @Excel(name = "零售价格")
    private BigDecimal retailPrice;

    @ApiModelProperty("商品详细介绍")
    @Excel(name = "商品详细介绍")
    private String detail;

    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addTime;

    @ApiModelProperty("逻辑删除")
    @Excel(name = "逻辑删除")
    private Integer deleted;

}
